<template>
  <!--投诉建议-->
  <div>
    <carousel :autoplaySpeed="autoplaySpeed" :Img="Img"></carousel>
    <div class="wrapper">
      <Row :gutter="16">
        <i-col span="6">
          <ngn :data="data" :activeIndex="activeIndex"></ngn>
        </i-col>
        <i-col span="18">
          <div class="com">
            <p class="p">
              <Icon type="ios-pin" /><span>您现在的位置是:</span><span class="span">{{data.title}}</span><span> > </span><span class="span">投诉建议</span>
            </p>
          </div>
          <div>
            <div style="margin-top: 30px">
              <Input v-model="text" type="textarea" :rows="9" />
            </div>
            <p style="padding-top: 20px">
              <input type="file" class="upload__input" @change="uploadChange">
            </p>
            <div style="text-align: center;margin-bottom: 50px">
              <Button type="primary" @click="submit">提交</Button>
            </div>
          </div>
        </i-col>
      </Row>
    </div>
  </div>
</template>

<script>
  import carousel from '../module/carousel'
  import ngn from '../module/ngn'
  export default {
    components: {
      carousel,ngn
    },
    data() {
      return {
        activeIndex: 4,
        autoplaySpeed: 100000,
        workTrendLink: '',
        Img:[
          {
            id: 1,
            imageLocation: require('../../assets/img/u69.jpg'),
            state: true,
            uri: "",
          },
        ],
        data: {
          title: '个人中心',
          list: [
            {list: '个人信息', link: 'personalInformation',},
            {list: '稿件直投', link: 'ManuscriptDirectInvestment',},
            {list: '稿件评估', link: 'TheManuscriptEvaluation',},
            {list: '账号安全', link: 'accountSecurity',},
            {list: '投诉建议', link: 'complaintAndAdvice',},
          ],
        },
        /*文本*/
        text:'',
        file:'',
      }
    },
    mounted() {
      window.scrollTo(0,0);
    },
    methods: {
      uploadChange(event){
        this.file = event.target.files
      },
      submit(){
        this.$Message.warning('暂无接口！')
/*        let _this = this;
        let formData = new FormData();
        formData.append("file", this.file);
        formData.append("", JSON.stringify(this.text));
        let config = {
          headers:{'Content-Type':'multipart/form-data'}
        };
        this.$axios.post(url, formData,config).then(function (res) {
          _this.$router.go(0)
        })*/
      }
    }
  }
</script>

<style scoped>
  .com .p{
    padding: 10px 0;
    font-size: 16px;
    font-weight: bold;
    border-bottom: 1px solid #000;
  }
  .span{
    padding: 0 10px;
  }
  .upload__input::-webkit-file-upload-button {
    background: #efeeee;
    color: #333;
    border: 0;
    border-radius: 5px;
    font-size: 12px;
    padding: 10px 15px;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, .1), 0 0 10px rgba(0, 0, 0, .12);
  }
</style>
